<!DOCTYPE html>
<html>
<head>
    <title>用户自定义地址去播放视频inputPlay</title>
    <link href="http://libs.baidu.com/bootstrap/3.0.3/css/bootstrap.min.css" rel="stylesheet">
    <script src="http://libs.baidu.com/bootstrap/3.0.3/js/bootstrap.min.js"></script>
    <script type="text/javascript" src="http://apps.bdimg.com/libs/jquery/2.1.1/jquery.min.js"></script>
    <style type="text/css">
        html, body {
            height: 100%
        }

        body {
            margin: 0;
            overflow: hidden;
        }

        * {
            padding: 0;
            margin: 0;
            list-style: none;
        }

        html, body {
            margin: 0px;
            padding: 0px;
            width: 100%;
            height: 100%;
            font-size: 62.5%;
        }

    </style>
</head>
<body>


<div class="container">
    <div class="row">
        <div class="col-lg-12  clearfix-context">
            <div class="main-box no-header clearfix">
                <div class="main-box-body clearfix">
                    <div style="width: 1130px; height: 352px; margin-left: auto;margin-right: auto">
                        <script type="text/javascript" src="http://jackzhang1204.github.io/sewise/sewise_player/player/sewise.player.min.js"></script>
                        <script type="text/javascript">
                            $(function(){
                                default_stream_address = "rtmp://leplay.amaitech.com/test/123456";
                                playLiveChannel(default_stream_address);
                                $("#form_button").click(function () {
                                    var msg = $("#msg");
                                    var stream_address = $('input[name="stream_address"] ').val();
                                    $('#stream_address_code ').html("\"" + stream_address + "\"");
                                    playLiveChannel(stream_address);
                                });
                            });

                            function playLiveChannel(url) {
                                SewisePlayer.setup({
                                    server: "live",
                                    type: "rtmp",
                                    streamurl: url,
                                    autostart: "true",
                                    buffer: "5",
                                    title: "RTMP src path",
                                    lang: "zh_CN",
                                    claritybutton: "disable",   //是否自动影藏导航栏
                                    skin: "liveWhite",
                                });
                            }

                        </script>
                    </div>
                </div>
            </div>
            <p></p>
            <div class="input-group">
                <input type="text" name="stream_address" id="stream_address" required autofocus  placeholder="输入媒体流地址，注意不要含有空格" class="form-control">
                <span class="input-group-btn input-btn">
                        <button class="btn btn-default" id="form_button" type="button">提交</button>
                    </span>
            </div>
        </div>
    </div>
</div>

</body>
</html>
